import React from 'react';
import { Card } from 'antd';
import classNames from 'classnames';
import styles from './index.less';

const Index = props => {
  const {
    type, // 卡片类型，可设置为 inner 或 不设置
    className, // 容器类名
    ...rest
  } = props;
  return (
    <div
      className={classNames(styles.col24, type === 'inner' ? styles.mb5 : styles.mb10, className)}
    >
      <Card {...rest} type={type} />
    </div>
  );
};

Object.keys(Card).forEach(item => {
  if (!['defaultProps'].includes(item)) {
    Index[item] = Card[item];
  }
});
Index.displayName = 'Card';
export default Index;
